﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TDB
{
  public static class MultiDomainExceptionTracker
  {
    public static void TrackException(Exception ex)
    {
      if (ex != null)
      {
        ex.Data.Add("_trackedsubdomain", AppDomain.CurrentDomain.Id);
      }
      System.Diagnostics.Debug.WriteLine("tt");
      return;
    }

    public static int GetDomainIdForException(Exception ex)
    {
      if (ex != null && ex.Data.Contains("_trackedsubdomain"))
        return (int)ex.Data["_trackedsubdomain"];
      return 0;
    }
  }
}
